<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件冒泡</title>
    <script src="vue.js"></script>
    <style>
        .parent {
            width: 200px;
            height: 150px;
            background-color: green;
        }

        .child {
            width: 100px;
            height: 75px;
            background-color: red;
        }
    </style>
</head>

<body>
    <div id="app">
        <!-- <div class="parent" @click="clickParent">
            <div class="child" @click.stop="clcikChild"></div> -->
        <div class="parent" @click.self="clickParent">
            <div class="child" @click="clcikChild"></div>
        </div>
    </div>


</body>

</html>
<script>
    var vm = new Vue({
        el: "#app",
        methods: {
            clickParent: function () {
                console.log("****clickParent*****");
            },
            clcikChild: function () {
                console.log("###clickChild###");
            }
        },
    })
</script>